﻿#include <iostream>
#include <string>
#include "test.pb.h"


int main()
{
	mypb::User user;
	user.set_username("root");
	user.set_password("rootroot");
	user.set_private_ip("192.168.226.186:6666");
	std::string data = user.SerializeAsString();
	std::cout << data << std::endl;

	mypb::User newUser;
	newUser.ParseFromString(data);
	std::cout << newUser.password() << " " << newUser.username() << " "
		<< newUser.private_ip() << std::endl;

	return 0;
}
